package mock.servicesdirectory.organisations.dao.daoimpl;

import java.util.ArrayList;
import java.util.List;

import mock.servicesdirectory.common.entities.Organisation;
import mock.servicesdirectory.organisations.dao.daointerface.OrganisationDAO;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

public class OrganisationDAOImpl extends HibernateDaoSupport implements OrganisationDAO{

	@SuppressWarnings("unchecked")
	@Override
	// Get all organisation in database
	public List<Organisation> getOrganisation() {
		// TODO Auto-generated method stub
		return getHibernateTemplate().find("from Organisation");
		}

	@Override
	// Get all Organisation with active status in database
	public List<Organisation> getOrganisation(boolean active) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	// Method to get adaptive organisation . Result will depends the argument flag
	/*
	 * flag = 1 . Name start with a digit 0-9
	 * flag = 2 . Name start with A, B, C, D ,E
	 * flag = 3 . Name start with F, G, H, I, J
	 * flag = 4 . Name start with K, L, M, N
	 * flag = 5 . Name start with 0, P, Q , R
	 * flag = 6 . Name start with S, T, U , V
	 * flag = 7 . Name start with W, Y, Z
	 */
	public List<Organisation> getOrganisation(int flag) {
		// TODO Auto-generated method stub
		
		return null;
	}
	
}
